﻿#region Using directives

using System;
using System.Data;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;

using PAT.Entities;
using PAT.Data;

#endregion

namespace PAT.Data.Bases
{	
	///<summary>
	/// This class is the base class for any <see cref="PatOrdenTrabajoOperacionProviderBase"/> implementation.
	/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
	///</summary>
	public abstract partial class PatOrdenTrabajoOperacionProviderBaseCore : EntityProviderBase<PAT.Entities.PatOrdenTrabajoOperacion, PAT.Entities.PatOrdenTrabajoOperacionKey>
	{		
		#region Get from Many To Many Relationship Functions
		#endregion	
		
		#region Delete Methods

		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to delete.</param>
		/// <returns>Returns true if operation suceeded.</returns>
		public override bool Delete(TransactionManager transactionManager, PAT.Entities.PatOrdenTrabajoOperacionKey key)
		{
			return Delete(transactionManager, key.IdDocumento, key.NumeroOrden, key.IdOperacion);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="_idDocumento">. Primary Key.</param>
		/// <param name="_numeroOrden">. Primary Key.</param>
		/// <param name="_idOperacion">. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public bool Delete(System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion)
		{
			return Delete(null, _idDocumento, _numeroOrden, _idOperacion);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idDocumento">. Primary Key.</param>
		/// <param name="_numeroOrden">. Primary Key.</param>
		/// <param name="_idOperacion">. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public abstract bool Delete(TransactionManager transactionManager, System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion);		
		
		#endregion Delete Methods
		
		#region Get By Foreign Key Functions
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN Description: 
		/// </summary>
		/// <param name="_idCargoOperacion"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCargoOperacion(System.Byte _idCargoOperacion)
		{
			int count = -1;
			return GetByIdCargoOperacion(_idCargoOperacion, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCargoOperacion"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdCargoOperacion(TransactionManager transactionManager, System.Byte _idCargoOperacion)
		{
			int count = -1;
			return GetByIdCargoOperacion(transactionManager, _idCargoOperacion, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCargoOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCargoOperacion(TransactionManager transactionManager, System.Byte _idCargoOperacion, int start, int pageLength)
		{
			int count = -1;
			return GetByIdCargoOperacion(transactionManager, _idCargoOperacion, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN key.
		///		fkPatOrdenTrabajoOperacionPatCargoOrden Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCargoOperacion"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCargoOperacion(System.Byte _idCargoOperacion, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdCargoOperacion(null, _idCargoOperacion, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN key.
		///		fkPatOrdenTrabajoOperacionPatCargoOrden Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCargoOperacion"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCargoOperacion(System.Byte _idCargoOperacion, int start, int pageLength,out int count)
		{
			return GetByIdCargoOperacion(null, _idCargoOperacion, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CARGO_ORDEN Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCargoOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdCargoOperacion(TransactionManager transactionManager, System.Byte _idCargoOperacion, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA Description: 
		/// </summary>
		/// <param name="_idCausalGarantia1"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia1(System.Int16? _idCausalGarantia1)
		{
			int count = -1;
			return GetByIdCausalGarantia1(_idCausalGarantia1, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia1"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia1(TransactionManager transactionManager, System.Int16? _idCausalGarantia1)
		{
			int count = -1;
			return GetByIdCausalGarantia1(transactionManager, _idCausalGarantia1, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia1"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia1(TransactionManager transactionManager, System.Int16? _idCausalGarantia1, int start, int pageLength)
		{
			int count = -1;
			return GetByIdCausalGarantia1(transactionManager, _idCausalGarantia1, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia1"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia1(System.Int16? _idCausalGarantia1, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdCausalGarantia1(null, _idCausalGarantia1, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia1"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia1(System.Int16? _idCausalGarantia1, int start, int pageLength,out int count)
		{
			return GetByIdCausalGarantia1(null, _idCausalGarantia1, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia1"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia1(TransactionManager transactionManager, System.Int16? _idCausalGarantia1, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 Description: 
		/// </summary>
		/// <param name="_idCausalGarantia2"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia2(System.Int16? _idCausalGarantia2)
		{
			int count = -1;
			return GetByIdCausalGarantia2(_idCausalGarantia2, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia2"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia2(TransactionManager transactionManager, System.Int16? _idCausalGarantia2)
		{
			int count = -1;
			return GetByIdCausalGarantia2(transactionManager, _idCausalGarantia2, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia2"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia2(TransactionManager transactionManager, System.Int16? _idCausalGarantia2, int start, int pageLength)
		{
			int count = -1;
			return GetByIdCausalGarantia2(transactionManager, _idCausalGarantia2, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia1 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia2"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia2(System.Int16? _idCausalGarantia2, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdCausalGarantia2(null, _idCausalGarantia2, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia1 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia2"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia2(System.Int16? _idCausalGarantia2, int start, int pageLength,out int count)
		{
			return GetByIdCausalGarantia2(null, _idCausalGarantia2, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA1 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia2"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia2(TransactionManager transactionManager, System.Int16? _idCausalGarantia2, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 Description: 
		/// </summary>
		/// <param name="_idCausalGarantia3"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia3(System.Int16? _idCausalGarantia3)
		{
			int count = -1;
			return GetByIdCausalGarantia3(_idCausalGarantia3, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia3"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia3(TransactionManager transactionManager, System.Int16? _idCausalGarantia3)
		{
			int count = -1;
			return GetByIdCausalGarantia3(transactionManager, _idCausalGarantia3, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia3"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia3(TransactionManager transactionManager, System.Int16? _idCausalGarantia3, int start, int pageLength)
		{
			int count = -1;
			return GetByIdCausalGarantia3(transactionManager, _idCausalGarantia3, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia2 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia3"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia3(System.Int16? _idCausalGarantia3, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdCausalGarantia3(null, _idCausalGarantia3, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia2 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia3"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia3(System.Int16? _idCausalGarantia3, int start, int pageLength,out int count)
		{
			return GetByIdCausalGarantia3(null, _idCausalGarantia3, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA2 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia3"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia3(TransactionManager transactionManager, System.Int16? _idCausalGarantia3, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 Description: 
		/// </summary>
		/// <param name="_idCausalGarantia4"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia4(System.Int16? _idCausalGarantia4)
		{
			int count = -1;
			return GetByIdCausalGarantia4(_idCausalGarantia4, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia4"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia4(TransactionManager transactionManager, System.Int16? _idCausalGarantia4)
		{
			int count = -1;
			return GetByIdCausalGarantia4(transactionManager, _idCausalGarantia4, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia4"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia4(TransactionManager transactionManager, System.Int16? _idCausalGarantia4, int start, int pageLength)
		{
			int count = -1;
			return GetByIdCausalGarantia4(transactionManager, _idCausalGarantia4, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia3 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia4"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia4(System.Int16? _idCausalGarantia4, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdCausalGarantia4(null, _idCausalGarantia4, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 key.
		///		fkPatOrdenTrabajoOperacionPatCausalGarantia3 Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idCausalGarantia4"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia4(System.Int16? _idCausalGarantia4, int start, int pageLength,out int count)
		{
			return GetByIdCausalGarantia4(null, _idCausalGarantia4, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_CAUSAL_GARANTIA3 Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idCausalGarantia4"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdCausalGarantia4(TransactionManager transactionManager, System.Int16? _idCausalGarantia4, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO Description: 
		/// </summary>
		/// <param name="_idEmpleado"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEmpleado(System.Int32? _idEmpleado)
		{
			int count = -1;
			return GetByIdEmpleado(_idEmpleado, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idEmpleado"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdEmpleado(TransactionManager transactionManager, System.Int32? _idEmpleado)
		{
			int count = -1;
			return GetByIdEmpleado(transactionManager, _idEmpleado, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idEmpleado"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEmpleado(TransactionManager transactionManager, System.Int32? _idEmpleado, int start, int pageLength)
		{
			int count = -1;
			return GetByIdEmpleado(transactionManager, _idEmpleado, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO key.
		///		fkPatOrdenTrabajoOperacionPatEmpleado Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idEmpleado"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEmpleado(System.Int32? _idEmpleado, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdEmpleado(null, _idEmpleado, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO key.
		///		fkPatOrdenTrabajoOperacionPatEmpleado Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idEmpleado"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEmpleado(System.Int32? _idEmpleado, int start, int pageLength,out int count)
		{
			return GetByIdEmpleado(null, _idEmpleado, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_EMPLEADO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idEmpleado"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdEmpleado(TransactionManager transactionManager, System.Int32? _idEmpleado, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION Description: 
		/// </summary>
		/// <param name="_idEstadoOperacion"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEstadoOperacion(System.Byte? _idEstadoOperacion)
		{
			int count = -1;
			return GetByIdEstadoOperacion(_idEstadoOperacion, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idEstadoOperacion"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdEstadoOperacion(TransactionManager transactionManager, System.Byte? _idEstadoOperacion)
		{
			int count = -1;
			return GetByIdEstadoOperacion(transactionManager, _idEstadoOperacion, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idEstadoOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEstadoOperacion(TransactionManager transactionManager, System.Byte? _idEstadoOperacion, int start, int pageLength)
		{
			int count = -1;
			return GetByIdEstadoOperacion(transactionManager, _idEstadoOperacion, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION key.
		///		fkPatOrdenTrabajoOperacionPatEstadoOperacion Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idEstadoOperacion"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEstadoOperacion(System.Byte? _idEstadoOperacion, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdEstadoOperacion(null, _idEstadoOperacion, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION key.
		///		fkPatOrdenTrabajoOperacionPatEstadoOperacion Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idEstadoOperacion"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdEstadoOperacion(System.Byte? _idEstadoOperacion, int start, int pageLength,out int count)
		{
			return GetByIdEstadoOperacion(null, _idEstadoOperacion, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ESTADO_OPERACION Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idEstadoOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdEstadoOperacion(TransactionManager transactionManager, System.Byte? _idEstadoOperacion, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO Description: 
		/// </summary>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdDocumentoNumeroOrden(System.Int32 _idDocumento, System.Int32 _numeroOrden)
		{
			int count = -1;
			return GetByIdDocumentoNumeroOrden(_idDocumento, _numeroOrden, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdDocumentoNumeroOrden(TransactionManager transactionManager, System.Int32 _idDocumento, System.Int32 _numeroOrden)
		{
			int count = -1;
			return GetByIdDocumentoNumeroOrden(transactionManager, _idDocumento, _numeroOrden, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdDocumentoNumeroOrden(TransactionManager transactionManager, System.Int32 _idDocumento, System.Int32 _numeroOrden, int start, int pageLength)
		{
			int count = -1;
			return GetByIdDocumentoNumeroOrden(transactionManager, _idDocumento, _numeroOrden, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO key.
		///		fkPatOrdenTrabajoOperacionPatOrdenTrabajo Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdDocumentoNumeroOrden(System.Int32 _idDocumento, System.Int32 _numeroOrden, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdDocumentoNumeroOrden(null, _idDocumento, _numeroOrden, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO key.
		///		fkPatOrdenTrabajoOperacionPatOrdenTrabajo Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdDocumentoNumeroOrden(System.Int32 _idDocumento, System.Int32 _numeroOrden, int start, int pageLength,out int count)
		{
			return GetByIdDocumentoNumeroOrden(null, _idDocumento, _numeroOrden, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_ORDEN_TRABAJO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdDocumentoNumeroOrden(TransactionManager transactionManager, System.Int32 _idDocumento, System.Int32 _numeroOrden, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO Description: 
		/// </summary>
		/// <param name="_idOperacion"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdOperacion(System.Int32 _idOperacion)
		{
			int count = -1;
			return GetByIdOperacion(_idOperacion, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idOperacion"></param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		/// <remarks></remarks>
		public TList<PatOrdenTrabajoOperacion> GetByIdOperacion(TransactionManager transactionManager, System.Int32 _idOperacion)
		{
			int count = -1;
			return GetByIdOperacion(transactionManager, _idOperacion, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdOperacion(TransactionManager transactionManager, System.Int32 _idOperacion, int start, int pageLength)
		{
			int count = -1;
			return GetByIdOperacion(transactionManager, _idOperacion, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO key.
		///		fkPatOrdenTrabajoOperacionPatTempario Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idOperacion"></param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdOperacion(System.Int32 _idOperacion, int start, int pageLength)
		{
			int count =  -1;
			return GetByIdOperacion(null, _idOperacion, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO key.
		///		fkPatOrdenTrabajoOperacionPatTempario Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_idOperacion"></param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public TList<PatOrdenTrabajoOperacion> GetByIdOperacion(System.Int32 _idOperacion, int start, int pageLength,out int count)
		{
			return GetByIdOperacion(null, _idOperacion, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO key.
		///		FK_PAT_ORDEN_TRABAJO_OPERACION_PAT_TEMPARIO Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of PAT.Entities.PatOrdenTrabajoOperacion objects.</returns>
		public abstract TList<PatOrdenTrabajoOperacion> GetByIdOperacion(TransactionManager transactionManager, System.Int32 _idOperacion, int start, int pageLength, out int count);
		
		#endregion

		#region Get By Index Functions
		
		/// <summary>
		/// 	Gets a row from the DataSource based on its primary key.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to retrieve.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <returns>Returns an instance of the Entity class.</returns>
		public override PAT.Entities.PatOrdenTrabajoOperacion Get(TransactionManager transactionManager, PAT.Entities.PatOrdenTrabajoOperacionKey key, int start, int pageLength)
		{
			return GetByIdDocumentoNumeroOrdenIdOperacion(transactionManager, key.IdDocumento, key.NumeroOrden, key.IdOperacion, start, pageLength);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key PK_PAT_ORDEN_TRABAJO_OPERACION index.
		/// </summary>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="_idOperacion"></param>
		/// <returns>Returns an instance of the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> class.</returns>
		public PAT.Entities.PatOrdenTrabajoOperacion GetByIdDocumentoNumeroOrdenIdOperacion(System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion)
		{
			int count = -1;
			return GetByIdDocumentoNumeroOrdenIdOperacion(null,_idDocumento, _numeroOrden, _idOperacion, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_PAT_ORDEN_TRABAJO_OPERACION index.
		/// </summary>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="_idOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> class.</returns>
		public PAT.Entities.PatOrdenTrabajoOperacion GetByIdDocumentoNumeroOrdenIdOperacion(System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion, int start, int pageLength)
		{
			int count = -1;
			return GetByIdDocumentoNumeroOrdenIdOperacion(null, _idDocumento, _numeroOrden, _idOperacion, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_PAT_ORDEN_TRABAJO_OPERACION index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="_idOperacion"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> class.</returns>
		public PAT.Entities.PatOrdenTrabajoOperacion GetByIdDocumentoNumeroOrdenIdOperacion(TransactionManager transactionManager, System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion)
		{
			int count = -1;
			return GetByIdDocumentoNumeroOrdenIdOperacion(transactionManager, _idDocumento, _numeroOrden, _idOperacion, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_PAT_ORDEN_TRABAJO_OPERACION index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="_idOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> class.</returns>
		public PAT.Entities.PatOrdenTrabajoOperacion GetByIdDocumentoNumeroOrdenIdOperacion(TransactionManager transactionManager, System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion, int start, int pageLength)
		{
			int count = -1;
			return GetByIdDocumentoNumeroOrdenIdOperacion(transactionManager, _idDocumento, _numeroOrden, _idOperacion, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_PAT_ORDEN_TRABAJO_OPERACION index.
		/// </summary>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="_idOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> class.</returns>
		public PAT.Entities.PatOrdenTrabajoOperacion GetByIdDocumentoNumeroOrdenIdOperacion(System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion, int start, int pageLength, out int count)
		{
			return GetByIdDocumentoNumeroOrdenIdOperacion(null, _idDocumento, _numeroOrden, _idOperacion, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_PAT_ORDEN_TRABAJO_OPERACION index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_idDocumento"></param>
		/// <param name="_numeroOrden"></param>
		/// <param name="_idOperacion"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> class.</returns>
		public abstract PAT.Entities.PatOrdenTrabajoOperacion GetByIdDocumentoNumeroOrdenIdOperacion(TransactionManager transactionManager, System.Int32 _idDocumento, System.Int32 _numeroOrden, System.Int32 _idOperacion, int start, int pageLength, out int count);
						
		#endregion "Get By Index Functions"
	
		#region Custom Methods
		
		
		#endregion

		#region Helper Functions	
		
		/// <summary>
		/// Fill a TList&lt;PatOrdenTrabajoOperacion&gt; From a DataReader.
		/// </summary>
		/// <param name="reader">Datareader</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">number of rows.</param>
		/// <returns>a <see cref="TList&lt;PatOrdenTrabajoOperacion&gt;"/></returns>
		public static TList<PatOrdenTrabajoOperacion> Fill(IDataReader reader, TList<PatOrdenTrabajoOperacion> rows, int start, int pageLength)
		{
			NetTiersProvider currentProvider = DataRepository.Provider;
            bool useEntityFactory = currentProvider.UseEntityFactory;
            bool enableEntityTracking = currentProvider.EnableEntityTracking;
            LoadPolicy currentLoadPolicy = currentProvider.CurrentLoadPolicy;
			Type entityCreationFactoryType = currentProvider.EntityCreationalFactoryType;
			
			// advance to the starting row
			for (int i = 0; i < start; i++)
			{
				if (!reader.Read())
				return rows; // not enough rows, just return
			}
			for (int i = 0; i < pageLength; i++)
			{
				if (!reader.Read())
					break; // we are done
					
				string key = null;
				
				PAT.Entities.PatOrdenTrabajoOperacion c = null;
				if (useEntityFactory)
				{
					key = new System.Text.StringBuilder("PatOrdenTrabajoOperacion")
					.Append("|").Append((System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.IdDocumento - 1)])
					.Append("|").Append((System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.NumeroOrden - 1)])
					.Append("|").Append((System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.IdOperacion - 1)]).ToString();
					c = EntityManager.LocateOrCreate<PatOrdenTrabajoOperacion>(
					key.ToString(), // EntityTrackingKey
					"PatOrdenTrabajoOperacion",  //Creational Type
					entityCreationFactoryType,  //Factory used to create entity
					enableEntityTracking); // Track this entity?
				}
				else
				{
					c = new PAT.Entities.PatOrdenTrabajoOperacion();
				}
				
				if (!enableEntityTracking ||
					c.EntityState == EntityState.Added ||
					(enableEntityTracking &&
					
						(
							(currentLoadPolicy == LoadPolicy.PreserveChanges && c.EntityState == EntityState.Unchanged) ||
							(currentLoadPolicy == LoadPolicy.DiscardChanges && c.EntityState != EntityState.Unchanged)
						)
					))
				{
					c.SuppressEntityEvents = true;
					c.IdDocumento = (System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.IdDocumento - 1)];
					c.OriginalIdDocumento = c.IdDocumento;
					c.NumeroOrden = (System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.NumeroOrden - 1)];
					c.OriginalNumeroOrden = c.NumeroOrden;
					c.IdOperacion = (System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.IdOperacion - 1)];
					c.OriginalIdOperacion = c.IdOperacion;
					c.IdCargoOperacion = (System.Byte)reader[((int)PatOrdenTrabajoOperacionColumn.IdCargoOperacion - 1)];
					c.IdEmpleado = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdEmpleado - 1)))?null:(System.Int32?)reader[((int)PatOrdenTrabajoOperacionColumn.IdEmpleado - 1)];
					c.FechaCumplimiento = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.FechaCumplimiento - 1)))?null:(System.DateTime?)reader[((int)PatOrdenTrabajoOperacionColumn.FechaCumplimiento - 1)];
					c.IdEstadoOperacion = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdEstadoOperacion - 1)))?null:(System.Byte?)reader[((int)PatOrdenTrabajoOperacionColumn.IdEstadoOperacion - 1)];
					c.IdCausalGarantia1 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia1 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia1 - 1)];
					c.IdCausalGarantia2 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia2 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia2 - 1)];
					c.IdCausalGarantia3 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia3 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia3 - 1)];
					c.IdCausalGarantia4 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia4 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia4 - 1)];
					c.TiempoLiquidado = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.TiempoLiquidado - 1)))?null:(System.Decimal?)reader[((int)PatOrdenTrabajoOperacionColumn.TiempoLiquidado - 1)];
					c.ValorOperacion = (System.Decimal)reader[((int)PatOrdenTrabajoOperacionColumn.ValorOperacion - 1)];
					c.FechaLiquidacion = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.FechaLiquidacion - 1)))?null:(System.DateTime?)reader[((int)PatOrdenTrabajoOperacionColumn.FechaLiquidacion - 1)];
					c.TiempoOriginalOperacion = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.TiempoOriginalOperacion - 1)))?null:(System.Decimal?)reader[((int)PatOrdenTrabajoOperacionColumn.TiempoOriginalOperacion - 1)];
					c.Activo = (System.Boolean)reader[((int)PatOrdenTrabajoOperacionColumn.Activo - 1)];
					c.EntityTrackingKey = key;
					c.AcceptChanges();
					c.SuppressEntityEvents = false;
				}
				rows.Add(c);
			}
		return rows;
		}		
		/// <summary>
		/// Refreshes the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> object from the <see cref="IDataReader"/>.
		/// </summary>
		/// <param name="reader">The <see cref="IDataReader"/> to read from.</param>
		/// <param name="entity">The <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> object to refresh.</param>
		public static void RefreshEntity(IDataReader reader, PAT.Entities.PatOrdenTrabajoOperacion entity)
		{
			if (!reader.Read()) return;
			
			entity.IdDocumento = (System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.IdDocumento - 1)];
			entity.OriginalIdDocumento = (System.Int32)reader["ID_DOCUMENTO"];
			entity.NumeroOrden = (System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.NumeroOrden - 1)];
			entity.OriginalNumeroOrden = (System.Int32)reader["NUMERO_ORDEN"];
			entity.IdOperacion = (System.Int32)reader[((int)PatOrdenTrabajoOperacionColumn.IdOperacion - 1)];
			entity.OriginalIdOperacion = (System.Int32)reader["ID_OPERACION"];
			entity.IdCargoOperacion = (System.Byte)reader[((int)PatOrdenTrabajoOperacionColumn.IdCargoOperacion - 1)];
			entity.IdEmpleado = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdEmpleado - 1)))?null:(System.Int32?)reader[((int)PatOrdenTrabajoOperacionColumn.IdEmpleado - 1)];
			entity.FechaCumplimiento = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.FechaCumplimiento - 1)))?null:(System.DateTime?)reader[((int)PatOrdenTrabajoOperacionColumn.FechaCumplimiento - 1)];
			entity.IdEstadoOperacion = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdEstadoOperacion - 1)))?null:(System.Byte?)reader[((int)PatOrdenTrabajoOperacionColumn.IdEstadoOperacion - 1)];
			entity.IdCausalGarantia1 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia1 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia1 - 1)];
			entity.IdCausalGarantia2 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia2 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia2 - 1)];
			entity.IdCausalGarantia3 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia3 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia3 - 1)];
			entity.IdCausalGarantia4 = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia4 - 1)))?null:(System.Int16?)reader[((int)PatOrdenTrabajoOperacionColumn.IdCausalGarantia4 - 1)];
			entity.TiempoLiquidado = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.TiempoLiquidado - 1)))?null:(System.Decimal?)reader[((int)PatOrdenTrabajoOperacionColumn.TiempoLiquidado - 1)];
			entity.ValorOperacion = (System.Decimal)reader[((int)PatOrdenTrabajoOperacionColumn.ValorOperacion - 1)];
			entity.FechaLiquidacion = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.FechaLiquidacion - 1)))?null:(System.DateTime?)reader[((int)PatOrdenTrabajoOperacionColumn.FechaLiquidacion - 1)];
			entity.TiempoOriginalOperacion = (reader.IsDBNull(((int)PatOrdenTrabajoOperacionColumn.TiempoOriginalOperacion - 1)))?null:(System.Decimal?)reader[((int)PatOrdenTrabajoOperacionColumn.TiempoOriginalOperacion - 1)];
			entity.Activo = (System.Boolean)reader[((int)PatOrdenTrabajoOperacionColumn.Activo - 1)];
			entity.AcceptChanges();
		}
		
		/// <summary>
		/// Refreshes the <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> object from the <see cref="DataSet"/>.
		/// </summary>
		/// <param name="dataSet">The <see cref="DataSet"/> to read from.</param>
		/// <param name="entity">The <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> object.</param>
		public static void RefreshEntity(DataSet dataSet, PAT.Entities.PatOrdenTrabajoOperacion entity)
		{
			DataRow dataRow = dataSet.Tables[0].Rows[0];
			
			entity.IdDocumento = (System.Int32)dataRow["ID_DOCUMENTO"];
			entity.OriginalIdDocumento = (System.Int32)dataRow["ID_DOCUMENTO"];
			entity.NumeroOrden = (System.Int32)dataRow["NUMERO_ORDEN"];
			entity.OriginalNumeroOrden = (System.Int32)dataRow["NUMERO_ORDEN"];
			entity.IdOperacion = (System.Int32)dataRow["ID_OPERACION"];
			entity.OriginalIdOperacion = (System.Int32)dataRow["ID_OPERACION"];
			entity.IdCargoOperacion = (System.Byte)dataRow["ID_CARGO_OPERACION"];
			entity.IdEmpleado = Convert.IsDBNull(dataRow["ID_EMPLEADO"]) ? null : (System.Int32?)dataRow["ID_EMPLEADO"];
			entity.FechaCumplimiento = Convert.IsDBNull(dataRow["FECHA_CUMPLIMIENTO"]) ? null : (System.DateTime?)dataRow["FECHA_CUMPLIMIENTO"];
			entity.IdEstadoOperacion = Convert.IsDBNull(dataRow["ID_ESTADO_OPERACION"]) ? null : (System.Byte?)dataRow["ID_ESTADO_OPERACION"];
			entity.IdCausalGarantia1 = Convert.IsDBNull(dataRow["ID_CAUSAL_GARANTIA_1"]) ? null : (System.Int16?)dataRow["ID_CAUSAL_GARANTIA_1"];
			entity.IdCausalGarantia2 = Convert.IsDBNull(dataRow["ID_CAUSAL_GARANTIA_2"]) ? null : (System.Int16?)dataRow["ID_CAUSAL_GARANTIA_2"];
			entity.IdCausalGarantia3 = Convert.IsDBNull(dataRow["ID_CAUSAL_GARANTIA_3"]) ? null : (System.Int16?)dataRow["ID_CAUSAL_GARANTIA_3"];
			entity.IdCausalGarantia4 = Convert.IsDBNull(dataRow["ID_CAUSAL_GARANTIA_4"]) ? null : (System.Int16?)dataRow["ID_CAUSAL_GARANTIA_4"];
			entity.TiempoLiquidado = Convert.IsDBNull(dataRow["TIEMPO_LIQUIDADO"]) ? null : (System.Decimal?)dataRow["TIEMPO_LIQUIDADO"];
			entity.ValorOperacion = (System.Decimal)dataRow["VALOR_OPERACION"];
			entity.FechaLiquidacion = Convert.IsDBNull(dataRow["FECHA_LIQUIDACION"]) ? null : (System.DateTime?)dataRow["FECHA_LIQUIDACION"];
			entity.TiempoOriginalOperacion = Convert.IsDBNull(dataRow["TIEMPO_ORIGINAL_OPERACION"]) ? null : (System.Decimal?)dataRow["TIEMPO_ORIGINAL_OPERACION"];
			entity.Activo = (System.Boolean)dataRow["ACTIVO"];
			entity.AcceptChanges();
		}
		#endregion 
		
		#region DeepLoad Methods
		/// <summary>
		/// Deep Loads the <see cref="IEntity"/> object with criteria based of the child 
		/// property collections only N Levels Deep based on the <see cref="DeepLoadType"/>.
		/// </summary>
		/// <remarks>
		/// Use this method with caution as it is possible to DeepLoad with Recursion and traverse an entire object graph.
		/// </remarks>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="entity">The <see cref="PAT.Entities.PatOrdenTrabajoOperacion"/> object to load.</param>
		/// <param name="deep">Boolean. A flag that indicates whether to recursively save all Property Collection that are descendants of this instance. If True, saves the complete object graph below this object. If False, saves this object only. </param>
		/// <param name="deepLoadType">DeepLoadType Enumeration to Include/Exclude object property collections from Load.</param>
		/// <param name="childTypes">PAT.Entities.PatOrdenTrabajoOperacion Property Collection Type Array To Include or Exclude from Load</param>
		/// <param name="innerList">A collection of child types for easy access.</param>
	    /// <exception cref="ArgumentNullException">entity or childTypes is null.</exception>
	    /// <exception cref="ArgumentException">deepLoadType has invalid value.</exception>
		public override void DeepLoad(TransactionManager transactionManager, PAT.Entities.PatOrdenTrabajoOperacion entity, bool deep, DeepLoadType deepLoadType, System.Type[] childTypes, DeepSession innerList)
		{
			if(entity == null)
				return;

			#region IdCargoOperacionSource	
			if (CanDeepLoad(entity, "PatCargoOrden|IdCargoOperacionSource", deepLoadType, innerList) 
				&& entity.IdCargoOperacionSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.IdCargoOperacion;
				PatCargoOrden tmpEntity = EntityManager.LocateEntity<PatCargoOrden>(EntityLocator.ConstructKeyFromPkItems(typeof(PatCargoOrden), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdCargoOperacionSource = tmpEntity;
				else
					entity.IdCargoOperacionSource = DataRepository.PatCargoOrdenProvider.GetByIdCargoOrden(transactionManager, entity.IdCargoOperacion);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdCargoOperacionSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdCargoOperacionSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatCargoOrdenProvider.DeepLoad(transactionManager, entity.IdCargoOperacionSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdCargoOperacionSource

			#region IdCausalGarantia1Source	
			if (CanDeepLoad(entity, "PatCausalGarantia|IdCausalGarantia1Source", deepLoadType, innerList) 
				&& entity.IdCausalGarantia1Source == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IdCausalGarantia1 ?? (short)0);
				PatCausalGarantia tmpEntity = EntityManager.LocateEntity<PatCausalGarantia>(EntityLocator.ConstructKeyFromPkItems(typeof(PatCausalGarantia), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdCausalGarantia1Source = tmpEntity;
				else
					entity.IdCausalGarantia1Source = DataRepository.PatCausalGarantiaProvider.GetByIdCausal(transactionManager, (entity.IdCausalGarantia1 ?? (short)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdCausalGarantia1Source' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdCausalGarantia1Source != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatCausalGarantiaProvider.DeepLoad(transactionManager, entity.IdCausalGarantia1Source, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdCausalGarantia1Source

			#region IdCausalGarantia2Source	
			if (CanDeepLoad(entity, "PatCausalGarantia|IdCausalGarantia2Source", deepLoadType, innerList) 
				&& entity.IdCausalGarantia2Source == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IdCausalGarantia2 ?? (short)0);
				PatCausalGarantia tmpEntity = EntityManager.LocateEntity<PatCausalGarantia>(EntityLocator.ConstructKeyFromPkItems(typeof(PatCausalGarantia), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdCausalGarantia2Source = tmpEntity;
				else
					entity.IdCausalGarantia2Source = DataRepository.PatCausalGarantiaProvider.GetByIdCausal(transactionManager, (entity.IdCausalGarantia2 ?? (short)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdCausalGarantia2Source' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdCausalGarantia2Source != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatCausalGarantiaProvider.DeepLoad(transactionManager, entity.IdCausalGarantia2Source, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdCausalGarantia2Source

			#region IdCausalGarantia3Source	
			if (CanDeepLoad(entity, "PatCausalGarantia|IdCausalGarantia3Source", deepLoadType, innerList) 
				&& entity.IdCausalGarantia3Source == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IdCausalGarantia3 ?? (short)0);
				PatCausalGarantia tmpEntity = EntityManager.LocateEntity<PatCausalGarantia>(EntityLocator.ConstructKeyFromPkItems(typeof(PatCausalGarantia), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdCausalGarantia3Source = tmpEntity;
				else
					entity.IdCausalGarantia3Source = DataRepository.PatCausalGarantiaProvider.GetByIdCausal(transactionManager, (entity.IdCausalGarantia3 ?? (short)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdCausalGarantia3Source' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdCausalGarantia3Source != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatCausalGarantiaProvider.DeepLoad(transactionManager, entity.IdCausalGarantia3Source, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdCausalGarantia3Source

			#region IdCausalGarantia4Source	
			if (CanDeepLoad(entity, "PatCausalGarantia|IdCausalGarantia4Source", deepLoadType, innerList) 
				&& entity.IdCausalGarantia4Source == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IdCausalGarantia4 ?? (short)0);
				PatCausalGarantia tmpEntity = EntityManager.LocateEntity<PatCausalGarantia>(EntityLocator.ConstructKeyFromPkItems(typeof(PatCausalGarantia), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdCausalGarantia4Source = tmpEntity;
				else
					entity.IdCausalGarantia4Source = DataRepository.PatCausalGarantiaProvider.GetByIdCausal(transactionManager, (entity.IdCausalGarantia4 ?? (short)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdCausalGarantia4Source' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdCausalGarantia4Source != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatCausalGarantiaProvider.DeepLoad(transactionManager, entity.IdCausalGarantia4Source, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdCausalGarantia4Source

			#region IdEmpleadoSource	
			if (CanDeepLoad(entity, "PatEmpleado|IdEmpleadoSource", deepLoadType, innerList) 
				&& entity.IdEmpleadoSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IdEmpleado ?? (int)0);
				PatEmpleado tmpEntity = EntityManager.LocateEntity<PatEmpleado>(EntityLocator.ConstructKeyFromPkItems(typeof(PatEmpleado), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdEmpleadoSource = tmpEntity;
				else
					entity.IdEmpleadoSource = DataRepository.PatEmpleadoProvider.GetByIdEmpleado(transactionManager, (entity.IdEmpleado ?? (int)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdEmpleadoSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdEmpleadoSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatEmpleadoProvider.DeepLoad(transactionManager, entity.IdEmpleadoSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdEmpleadoSource

			#region IdEstadoOperacionSource	
			if (CanDeepLoad(entity, "PatEstadoOperacion|IdEstadoOperacionSource", deepLoadType, innerList) 
				&& entity.IdEstadoOperacionSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.IdEstadoOperacion ?? (byte)0);
				PatEstadoOperacion tmpEntity = EntityManager.LocateEntity<PatEstadoOperacion>(EntityLocator.ConstructKeyFromPkItems(typeof(PatEstadoOperacion), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdEstadoOperacionSource = tmpEntity;
				else
					entity.IdEstadoOperacionSource = DataRepository.PatEstadoOperacionProvider.GetByIdEstadoOperacion(transactionManager, (entity.IdEstadoOperacion ?? (byte)0));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdEstadoOperacionSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdEstadoOperacionSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatEstadoOperacionProvider.DeepLoad(transactionManager, entity.IdEstadoOperacionSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdEstadoOperacionSource

			#region IdDocumentoNumeroOrdenSource	
			if (CanDeepLoad(entity, "PatOrdenTrabajo|IdDocumentoNumeroOrdenSource", deepLoadType, innerList) 
				&& entity.IdDocumentoNumeroOrdenSource == null)
			{
				object[] pkItems = new object[2];
				pkItems[0] = entity.IdDocumento;
				pkItems[1] = entity.NumeroOrden;
				PatOrdenTrabajo tmpEntity = EntityManager.LocateEntity<PatOrdenTrabajo>(EntityLocator.ConstructKeyFromPkItems(typeof(PatOrdenTrabajo), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdDocumentoNumeroOrdenSource = tmpEntity;
				else
					entity.IdDocumentoNumeroOrdenSource = DataRepository.PatOrdenTrabajoProvider.GetByIdDocumentoNumeroOrden(transactionManager, entity.IdDocumento, entity.NumeroOrden);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdDocumentoNumeroOrdenSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdDocumentoNumeroOrdenSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatOrdenTrabajoProvider.DeepLoad(transactionManager, entity.IdDocumentoNumeroOrdenSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdDocumentoNumeroOrdenSource

			#region IdOperacionSource	
			if (CanDeepLoad(entity, "PatTempario|IdOperacionSource", deepLoadType, innerList) 
				&& entity.IdOperacionSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.IdOperacion;
				PatTempario tmpEntity = EntityManager.LocateEntity<PatTempario>(EntityLocator.ConstructKeyFromPkItems(typeof(PatTempario), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.IdOperacionSource = tmpEntity;
				else
					entity.IdOperacionSource = DataRepository.PatTemparioProvider.GetByIdOperacion(transactionManager, entity.IdOperacion);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IdOperacionSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.IdOperacionSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.PatTemparioProvider.DeepLoad(transactionManager, entity.IdOperacionSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion IdOperacionSource
			
			//used to hold DeepLoad method delegates and fire after all the local children have been loaded.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
			// Deep load child collections  - Call GetByIdDocumentoNumeroOrdenIdOperacion methods when available
			
			#region PatOrdenTrabajoOperacionObservacionCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<PatOrdenTrabajoOperacionObservacion>|PatOrdenTrabajoOperacionObservacionCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'PatOrdenTrabajoOperacionObservacionCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.PatOrdenTrabajoOperacionObservacionCollection = DataRepository.PatOrdenTrabajoOperacionObservacionProvider.GetByIdDocumentoNumeroOrdenIdOperacion(transactionManager, entity.IdDocumento, entity.NumeroOrden, entity.IdOperacion);

				if (deep && entity.PatOrdenTrabajoOperacionObservacionCollection.Count > 0)
				{
					deepHandles.Add("PatOrdenTrabajoOperacionObservacionCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<PatOrdenTrabajoOperacionObservacion>) DataRepository.PatOrdenTrabajoOperacionObservacionProvider.DeepLoad,
						new object[] { transactionManager, entity.PatOrdenTrabajoOperacionObservacionCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			//Fire all DeepLoad Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			deepHandles = null;
		}
		
		#endregion 
		
		#region DeepSave Methods

		/// <summary>
		/// Deep Save the entire object graph of the PAT.Entities.PatOrdenTrabajoOperacion object with criteria based of the child 
		/// Type property array and DeepSaveType.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="entity">PAT.Entities.PatOrdenTrabajoOperacion instance</param>
		/// <param name="deepSaveType">DeepSaveType Enumeration to Include/Exclude object property collections from Save.</param>
		/// <param name="childTypes">PAT.Entities.PatOrdenTrabajoOperacion Property Collection Type Array To Include or Exclude from Save</param>
		/// <param name="innerList">A Hashtable of child types for easy access.</param>
		public override bool DeepSave(TransactionManager transactionManager, PAT.Entities.PatOrdenTrabajoOperacion entity, DeepSaveType deepSaveType, System.Type[] childTypes, DeepSession innerList)
		{	
			if (entity == null)
				return false;
							
			#region Composite Parent Properties
			//Save Source Composite Properties, however, don't call deep save on them.  
			//So they only get saved a single level deep.
			
			#region IdCargoOperacionSource
			if (CanDeepSave(entity, "PatCargoOrden|IdCargoOperacionSource", deepSaveType, innerList) 
				&& entity.IdCargoOperacionSource != null)
			{
				DataRepository.PatCargoOrdenProvider.Save(transactionManager, entity.IdCargoOperacionSource);
				entity.IdCargoOperacion = entity.IdCargoOperacionSource.IdCargoOrden;
			}
			#endregion 
			
			#region IdCausalGarantia1Source
			if (CanDeepSave(entity, "PatCausalGarantia|IdCausalGarantia1Source", deepSaveType, innerList) 
				&& entity.IdCausalGarantia1Source != null)
			{
				DataRepository.PatCausalGarantiaProvider.Save(transactionManager, entity.IdCausalGarantia1Source);
				entity.IdCausalGarantia1 = entity.IdCausalGarantia1Source.IdCausal;
			}
			#endregion 
			
			#region IdCausalGarantia2Source
			if (CanDeepSave(entity, "PatCausalGarantia|IdCausalGarantia2Source", deepSaveType, innerList) 
				&& entity.IdCausalGarantia2Source != null)
			{
				DataRepository.PatCausalGarantiaProvider.Save(transactionManager, entity.IdCausalGarantia2Source);
				entity.IdCausalGarantia2 = entity.IdCausalGarantia2Source.IdCausal;
			}
			#endregion 
			
			#region IdCausalGarantia3Source
			if (CanDeepSave(entity, "PatCausalGarantia|IdCausalGarantia3Source", deepSaveType, innerList) 
				&& entity.IdCausalGarantia3Source != null)
			{
				DataRepository.PatCausalGarantiaProvider.Save(transactionManager, entity.IdCausalGarantia3Source);
				entity.IdCausalGarantia3 = entity.IdCausalGarantia3Source.IdCausal;
			}
			#endregion 
			
			#region IdCausalGarantia4Source
			if (CanDeepSave(entity, "PatCausalGarantia|IdCausalGarantia4Source", deepSaveType, innerList) 
				&& entity.IdCausalGarantia4Source != null)
			{
				DataRepository.PatCausalGarantiaProvider.Save(transactionManager, entity.IdCausalGarantia4Source);
				entity.IdCausalGarantia4 = entity.IdCausalGarantia4Source.IdCausal;
			}
			#endregion 
			
			#region IdEmpleadoSource
			if (CanDeepSave(entity, "PatEmpleado|IdEmpleadoSource", deepSaveType, innerList) 
				&& entity.IdEmpleadoSource != null)
			{
				DataRepository.PatEmpleadoProvider.Save(transactionManager, entity.IdEmpleadoSource);
				entity.IdEmpleado = entity.IdEmpleadoSource.IdEmpleado;
			}
			#endregion 
			
			#region IdEstadoOperacionSource
			if (CanDeepSave(entity, "PatEstadoOperacion|IdEstadoOperacionSource", deepSaveType, innerList) 
				&& entity.IdEstadoOperacionSource != null)
			{
				DataRepository.PatEstadoOperacionProvider.Save(transactionManager, entity.IdEstadoOperacionSource);
				entity.IdEstadoOperacion = entity.IdEstadoOperacionSource.IdEstadoOperacion;
			}
			#endregion 
			
			#region IdDocumentoNumeroOrdenSource
			if (CanDeepSave(entity, "PatOrdenTrabajo|IdDocumentoNumeroOrdenSource", deepSaveType, innerList) 
				&& entity.IdDocumentoNumeroOrdenSource != null)
			{
				DataRepository.PatOrdenTrabajoProvider.Save(transactionManager, entity.IdDocumentoNumeroOrdenSource);
				entity.IdDocumento = entity.IdDocumentoNumeroOrdenSource.IdDocumento;
				entity.NumeroOrden = entity.IdDocumentoNumeroOrdenSource.NumeroOrden;
			}
			#endregion 
			
			#region IdOperacionSource
			if (CanDeepSave(entity, "PatTempario|IdOperacionSource", deepSaveType, innerList) 
				&& entity.IdOperacionSource != null)
			{
				DataRepository.PatTemparioProvider.Save(transactionManager, entity.IdOperacionSource);
				entity.IdOperacion = entity.IdOperacionSource.IdOperacion;
			}
			#endregion 
			#endregion Composite Parent Properties

			// Save Root Entity through Provider
			if (!entity.IsDeleted)
				this.Save(transactionManager, entity);
			
			//used to hold DeepSave method delegates and fire after all the local children have been saved.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
	
			#region List<PatOrdenTrabajoOperacionObservacion>
				if (CanDeepSave(entity.PatOrdenTrabajoOperacionObservacionCollection, "List<PatOrdenTrabajoOperacionObservacion>|PatOrdenTrabajoOperacionObservacionCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(PatOrdenTrabajoOperacionObservacion child in entity.PatOrdenTrabajoOperacionObservacionCollection)
					{
						if(child.IdDocumentoNumeroOrdenIdOperacionSource != null)
						{
							child.IdDocumento = child.IdDocumentoNumeroOrdenIdOperacionSource.IdDocumento;
							child.NumeroOrden = child.IdDocumentoNumeroOrdenIdOperacionSource.NumeroOrden;
							child.IdOperacion = child.IdDocumentoNumeroOrdenIdOperacionSource.IdOperacion;
						}
						else
						{
							child.IdDocumento = entity.IdDocumento;
							child.NumeroOrden = entity.NumeroOrden;
							child.IdOperacion = entity.IdOperacion;
						}

					}

					if (entity.PatOrdenTrabajoOperacionObservacionCollection.Count > 0 || entity.PatOrdenTrabajoOperacionObservacionCollection.DeletedItems.Count > 0)
					{
						//DataRepository.PatOrdenTrabajoOperacionObservacionProvider.Save(transactionManager, entity.PatOrdenTrabajoOperacionObservacionCollection);
						
						deepHandles.Add("PatOrdenTrabajoOperacionObservacionCollection",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< PatOrdenTrabajoOperacionObservacion >) DataRepository.PatOrdenTrabajoOperacionObservacionProvider.DeepSave,
							new object[] { transactionManager, entity.PatOrdenTrabajoOperacionObservacionCollection, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
			//Fire all DeepSave Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			
			// Save Root Entity through Provider, if not already saved in delete mode
			if (entity.IsDeleted)
				this.Save(transactionManager, entity);
				

			deepHandles = null;
						
			return true;
		}
		#endregion
	} // end class
	
	#region PatOrdenTrabajoOperacionChildEntityTypes
	
	///<summary>
	/// Enumeration used to expose the different child entity types 
	/// for child properties in <c>PAT.Entities.PatOrdenTrabajoOperacion</c>
	///</summary>
	public enum PatOrdenTrabajoOperacionChildEntityTypes
	{
		
		///<summary>
		/// Composite Property for <c>PatCargoOrden</c> at IdCargoOperacionSource
		///</summary>
		[ChildEntityType(typeof(PatCargoOrden))]
		PatCargoOrden,
			
		///<summary>
		/// Composite Property for <c>PatCausalGarantia</c> at IdCausalGarantia1Source
		///</summary>
		[ChildEntityType(typeof(PatCausalGarantia))]
		PatCausalGarantia,
			
		///<summary>
		/// Composite Property for <c>PatEmpleado</c> at IdEmpleadoSource
		///</summary>
		[ChildEntityType(typeof(PatEmpleado))]
		PatEmpleado,
			
		///<summary>
		/// Composite Property for <c>PatEstadoOperacion</c> at IdEstadoOperacionSource
		///</summary>
		[ChildEntityType(typeof(PatEstadoOperacion))]
		PatEstadoOperacion,
			
		///<summary>
		/// Composite Property for <c>PatOrdenTrabajo</c> at IdDocumentoNumeroOrdenSource
		///</summary>
		[ChildEntityType(typeof(PatOrdenTrabajo))]
		PatOrdenTrabajo,
			
		///<summary>
		/// Composite Property for <c>PatTempario</c> at IdOperacionSource
		///</summary>
		[ChildEntityType(typeof(PatTempario))]
		PatTempario,
	
		///<summary>
		/// Collection of <c>PatOrdenTrabajoOperacion</c> as OneToMany for PatOrdenTrabajoOperacionObservacionCollection
		///</summary>
		[ChildEntityType(typeof(TList<PatOrdenTrabajoOperacionObservacion>))]
		PatOrdenTrabajoOperacionObservacionCollection,
	}
	
	#endregion PatOrdenTrabajoOperacionChildEntityTypes
	
	#region PatOrdenTrabajoOperacionFilterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;PatOrdenTrabajoOperacionColumn&gt;"/> class
	/// that is used exclusively with a <see cref="PatOrdenTrabajoOperacion"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PatOrdenTrabajoOperacionFilterBuilder : SqlFilterBuilder<PatOrdenTrabajoOperacionColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PatOrdenTrabajoOperacionFilterBuilder class.
		/// </summary>
		public PatOrdenTrabajoOperacionFilterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the PatOrdenTrabajoOperacionFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PatOrdenTrabajoOperacionFilterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PatOrdenTrabajoOperacionFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PatOrdenTrabajoOperacionFilterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PatOrdenTrabajoOperacionFilterBuilder
	
	#region PatOrdenTrabajoOperacionParameterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ParameterizedSqlFilterBuilder&lt;PatOrdenTrabajoOperacionColumn&gt;"/> class
	/// that is used exclusively with a <see cref="PatOrdenTrabajoOperacion"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class PatOrdenTrabajoOperacionParameterBuilder : ParameterizedSqlFilterBuilder<PatOrdenTrabajoOperacionColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PatOrdenTrabajoOperacionParameterBuilder class.
		/// </summary>
		public PatOrdenTrabajoOperacionParameterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the PatOrdenTrabajoOperacionParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public PatOrdenTrabajoOperacionParameterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the PatOrdenTrabajoOperacionParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public PatOrdenTrabajoOperacionParameterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion PatOrdenTrabajoOperacionParameterBuilder
	
	#region PatOrdenTrabajoOperacionSortBuilder
    
    /// <summary>
    /// A strongly-typed instance of the <see cref="SqlSortBuilder&lt;PatOrdenTrabajoOperacionColumn&gt;"/> class
	/// that is used exclusively with a <see cref="PatOrdenTrabajoOperacion"/> object.
    /// </summary>
    [CLSCompliant(true)]
    public class PatOrdenTrabajoOperacionSortBuilder : SqlSortBuilder<PatOrdenTrabajoOperacionColumn>
    {
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the PatOrdenTrabajoOperacionSqlSortBuilder class.
		/// </summary>
		public PatOrdenTrabajoOperacionSortBuilder() : base() { }

		#endregion Constructors

    }    
    #endregion PatOrdenTrabajoOperacionSortBuilder
	
} // end namespace
